Optimal. Leaf size=164 \[ -\frac {d (b e (15 d e-13 c f)-3 a f (3 d e-c f)) x}{6 e f^3}+\frac {d (5 b e-3 a f) x \left (c+d x^2\right )}{6 e f^2}-\frac {(b e-a f) x \left (c+d x^2\right )^2}{2 e f \left (e+f x^2\right )}+\frac {(d e-c f) (b e (5 d e-c f)-a f (3 d e+c f)) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{2 e^{3/2} f^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 164, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {540, 542, 396,
211} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) (d e-c f) (b e (5 d e-c f)-a f (c f+3 d e))}{2 e^{3/2} f^{7/2}}-\frac {d x (b e (15 d e-13 c f)-3 a f (3 d e-c f))}{6 e f^3}+\frac {d x \left (c+d x^2\right ) (5 b e-3 a f)}{6 e f^2}-\frac {x \left (c+d x^2\right )^2 (b e-a f)}{2 e f \left (e+f x^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 396
Rule 540
Rule 542
Rubi steps
\begin {align*} \int \frac {\left (a+b x^2\right ) \left (c+d x^2\right )^2}{\left (e+f x^2\right )^2} \, dx &=-\frac {(b e-a f) x \left (c+d x^2\right )^2}{2 e f \left (e+f x^2\right )}-\frac {\int \frac {\left (c+d x^2\right ) \left (-c (b e+a f)-d (5 b e-3 a f) x^2\right )}{e+f x^2} \, dx}{2 e f}\\ &=\frac {d (5 b e-3 a f) x \left (c+d x^2\right )}{6 e f^2}-\frac {(b e-a f) x \left (c+d x^2\right )^2}{2 e f \left (e+f x^2\right )}-\frac {\int \frac {c (b e (5 d e-3 c f)-3 a f (d e+c f))+d (b e (15 d e-13 c f)-3 a f (3 d e-c f)) x^2}{e+f x^2} \, dx}{6 e f^2}\\ &=-\frac {d (b e (15 d e-13 c f)-3 a f (3 d e-c f)) x}{6 e f^3}+\frac {d (5 b e-3 a f) x \left (c+d x^2\right )}{6 e f^2}-\frac {(b e-a f) x \left (c+d x^2\right )^2}{2 e f \left (e+f x^2\right )}+\frac {((d e-c f) (b e (5 d e-c f)-a f (3 d e+c f))) \int \frac {1}{e+f x^2} \, dx}{2 e f^3}\\ &=-\frac {d (b e (15 d e-13 c f)-3 a f (3 d e-c f)) x}{6 e f^3}+\frac {d (5 b e-3 a f) x \left (c+d x^2\right )}{6 e f^2}-\frac {(b e-a f) x \left (c+d x^2\right )^2}{2 e f \left (e+f x^2\right )}+\frac {(d e-c f) (b e (5 d e-c f)-a f (3 d e+c f)) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{2 e^{3/2} f^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 134, normalized size = 0.82 \begin {gather*} \frac {d (-2 b d e+2 b c f+a d f) x}{f^3}+\frac {b d^2 x^3}{3 f^2}-\frac {(b e-a f) (d e-c f)^2 x}{2 e f^3 \left (e+f x^2\right )}+\frac {(d e-c f) (b e (5 d e-c f)-a f (3 d e+c f)) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{2 e^{3/2} f^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 182, normalized size = 1.11
method | result | size |
default | \(\frac {d \left (\frac {1}{3} b d \,x^{3} f +a d f x +2 b c f x -2 b d e x \right )}{f^{3}}+\frac {\frac {\left (c^{2} a \,f^{3}-2 a c d e \,f^{2}+a \,d^{2} e^{2} f -b \,c^{2} e \,f^{2}+2 b c d \,e^{2} f -b \,d^{2} e^{3}\right ) x}{2 e \left (f \,x^{2}+e \right )}+\frac {\left (c^{2} a \,f^{3}+2 a c d e \,f^{2}-3 a \,d^{2} e^{2} f +b \,c^{2} e \,f^{2}-6 b c d \,e^{2} f +5 b \,d^{2} e^{3}\right ) \arctan \left (\frac {f x}{\sqrt {f e}}\right )}{2 e \sqrt {f e}}}{f^{3}}\) | \(182\) |
risch | \(\frac {d^{2} b \,x^{3}}{3 f^{2}}+\frac {d^{2} a x}{f^{2}}+\frac {2 d b c x}{f^{2}}-\frac {2 d^{2} b e x}{f^{3}}+\frac {\left (c^{2} a \,f^{3}-2 a c d e \,f^{2}+a \,d^{2} e^{2} f -b \,c^{2} e \,f^{2}+2 b c d \,e^{2} f -b \,d^{2} e^{3}\right ) x}{2 e \,f^{3} \left (f \,x^{2}+e \right )}-\frac {\ln \left (f x +\sqrt {-f e}\right ) c^{2} a}{4 \sqrt {-f e}\, e}-\frac {\ln \left (f x +\sqrt {-f e}\right ) a c d}{2 f \sqrt {-f e}}+\frac {3 e \ln \left (f x +\sqrt {-f e}\right ) a \,d^{2}}{4 f^{2} \sqrt {-f e}}-\frac {\ln \left (f x +\sqrt {-f e}\right ) b \,c^{2}}{4 f \sqrt {-f e}}+\frac {3 e \ln \left (f x +\sqrt {-f e}\right ) b c d}{2 f^{2} \sqrt {-f e}}-\frac {5 e^{2} \ln \left (f x +\sqrt {-f e}\right ) b \,d^{2}}{4 f^{3} \sqrt {-f e}}+\frac {\ln \left (-f x +\sqrt {-f e}\right ) c^{2} a}{4 \sqrt {-f e}\, e}+\frac {\ln \left (-f x +\sqrt {-f e}\right ) a c d}{2 f \sqrt {-f e}}-\frac {3 e \ln \left (-f x +\sqrt {-f e}\right ) a \,d^{2}}{4 f^{2} \sqrt {-f e}}+\frac {\ln \left (-f x +\sqrt {-f e}\right ) b \,c^{2}}{4 f \sqrt {-f e}}-\frac {3 e \ln \left (-f x +\sqrt {-f e}\right ) b c d}{2 f^{2} \sqrt {-f e}}+\frac {5 e^{2} \ln \left (-f x +\sqrt {-f e}\right ) b \,d^{2}}{4 f^{3} \sqrt {-f e}}\) | \(440\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 186, normalized size = 1.13 \begin {gather*} \frac {{\left (a c^{2} f^{3} - b d^{2} e^{3} - {\left (b c^{2} e + 2 \, a c d e\right )} f^{2} + {\left (2 \, b c d e^{2} + a d^{2} e^{2}\right )} f\right )} x}{2 \, {\left (f^{4} x^{2} e + f^{3} e^{2}\right )}} + \frac {{\left (a c^{2} f^{3} + 5 \, b d^{2} e^{3} + {\left (b c^{2} e + 2 \, a c d e\right )} f^{2} - 3 \, {\left (2 \, b c d e^{2} + a d^{2} e^{2}\right )} f\right )} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\left (-\frac {3}{2}\right )}}{2 \, f^{\frac {7}{2}}} + \frac {b d^{2} f x^{3} - 3 \, {\left (2 \, b d^{2} e - {\left (2 \, b c d + a d^{2}\right )} f\right )} x}{3 \, f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.00, size = 552, normalized size = 3.37 \begin {gather*} \left [\frac {6 \, a c^{2} f^{4} x e - 30 \, b d^{2} f x e^{4} - 3 \, {\left (a c^{2} f^{4} x^{2} + 5 \, b d^{2} e^{4} + {\left (5 \, b d^{2} f x^{2} - 3 \, {\left (2 \, b c d + a d^{2}\right )} f\right )} e^{3} - {\left (3 \, {\left (2 \, b c d + a d^{2}\right )} f^{2} x^{2} - {\left (b c^{2} + 2 \, a c d\right )} f^{2}\right )} e^{2} + {\left (a c^{2} f^{3} + {\left (b c^{2} + 2 \, a c d\right )} f^{3} x^{2}\right )} e\right )} \sqrt {-f e} \log \left (\frac {f x^{2} - 2 \, \sqrt {-f e} x - e}{f x^{2} + e}\right ) - 2 \, {\left (10 \, b d^{2} f^{2} x^{3} - 9 \, {\left (2 \, b c d + a d^{2}\right )} f^{2} x\right )} e^{3} + 2 \, {\left (2 \, b d^{2} f^{3} x^{5} + 6 \, {\left (2 \, b c d + a d^{2}\right )} f^{3} x^{3} - 3 \, {\left (b c^{2} + 2 \, a c d\right )} f^{3} x\right )} e^{2}}{12 \, {\left (f^{5} x^{2} e^{2} + f^{4} e^{3}\right )}}, \frac {3 \, a c^{2} f^{4} x e - 15 \, b d^{2} f x e^{4} + 3 \, {\left (a c^{2} f^{4} x^{2} + 5 \, b d^{2} e^{4} + {\left (5 \, b d^{2} f x^{2} - 3 \, {\left (2 \, b c d + a d^{2}\right )} f\right )} e^{3} - {\left (3 \, {\left (2 \, b c d + a d^{2}\right )} f^{2} x^{2} - {\left (b c^{2} + 2 \, a c d\right )} f^{2}\right )} e^{2} + {\left (a c^{2} f^{3} + {\left (b c^{2} + 2 \, a c d\right )} f^{3} x^{2}\right )} e\right )} \sqrt {f} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\frac {1}{2}} - {\left (10 \, b d^{2} f^{2} x^{3} - 9 \, {\left (2 \, b c d + a d^{2}\right )} f^{2} x\right )} e^{3} + {\left (2 \, b d^{2} f^{3} x^{5} + 6 \, {\left (2 \, b c d + a d^{2}\right )} f^{3} x^{3} - 3 \, {\left (b c^{2} + 2 \, a c d\right )} f^{3} x\right )} e^{2}}{6 \, {\left (f^{5} x^{2} e^{2} + f^{4} e^{3}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 483 vs.
\(2 (151) = 302\).
time = 1.50, size = 483, normalized size = 2.95 \begin {gather*} \frac {b d^{2} x^{3}}{3 f^{2}} + x \left (\frac {a d^{2}}{f^{2}} + \frac {2 b c d}{f^{2}} - \frac {2 b d^{2} e}{f^{3}}\right ) + \frac {x \left (a c^{2} f^{3} - 2 a c d e f^{2} + a d^{2} e^{2} f - b c^{2} e f^{2} + 2 b c d e^{2} f - b d^{2} e^{3}\right )}{2 e^{2} f^{3} + 2 e f^{4} x^{2}} - \frac {\sqrt {- \frac {1}{e^{3} f^{7}}} \left (c f - d e\right ) \left (a c f^{2} + 3 a d e f + b c e f - 5 b d e^{2}\right ) \log {\left (- \frac {e^{2} f^{3} \sqrt {- \frac {1}{e^{3} f^{7}}} \left (c f - d e\right ) \left (a c f^{2} + 3 a d e f + b c e f - 5 b d e^{2}\right )}{a c^{2} f^{3} + 2 a c d e f^{2} - 3 a d^{2} e^{2} f + b c^{2} e f^{2} - 6 b c d e^{2} f + 5 b d^{2} e^{3}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{e^{3} f^{7}}} \left (c f - d e\right ) \left (a c f^{2} + 3 a d e f + b c e f - 5 b d e^{2}\right ) \log {\left (\frac {e^{2} f^{3} \sqrt {- \frac {1}{e^{3} f^{7}}} \left (c f - d e\right ) \left (a c f^{2} + 3 a d e f + b c e f - 5 b d e^{2}\right )}{a c^{2} f^{3} + 2 a c d e f^{2} - 3 a d^{2} e^{2} f + b c^{2} e f^{2} - 6 b c d e^{2} f + 5 b d^{2} e^{3}} + x \right )}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.67, size = 195, normalized size = 1.19 \begin {gather*} \frac {{\left (a c^{2} f^{3} + b c^{2} f^{2} e + 2 \, a c d f^{2} e - 6 \, b c d f e^{2} - 3 \, a d^{2} f e^{2} + 5 \, b d^{2} e^{3}\right )} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\left (-\frac {3}{2}\right )}}{2 \, f^{\frac {7}{2}}} + \frac {{\left (a c^{2} f^{3} x - b c^{2} f^{2} x e - 2 \, a c d f^{2} x e + 2 \, b c d f x e^{2} + a d^{2} f x e^{2} - b d^{2} x e^{3}\right )} e^{\left (-1\right )}}{2 \, {\left (f x^{2} + e\right )} f^{3}} + \frac {b d^{2} f^{4} x^{3} + 6 \, b c d f^{4} x + 3 \, a d^{2} f^{4} x - 6 \, b d^{2} f^{3} x e}{3 \, f^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 257, normalized size = 1.57 \begin {gather*} x\,\left (\frac {a\,d^2+2\,b\,c\,d}{f^2}-\frac {2\,b\,d^2\,e}{f^3}\right )+\frac {b\,d^2\,x^3}{3\,f^2}+\frac {x\,\left (-b\,c^2\,e\,f^2+a\,c^2\,f^3+2\,b\,c\,d\,e^2\,f-2\,a\,c\,d\,e\,f^2-b\,d^2\,e^3+a\,d^2\,e^2\,f\right )}{2\,e\,\left (f^4\,x^2+e\,f^3\right )}+\frac {\mathrm {atan}\left (\frac {\sqrt {f}\,x\,\left (c\,f-d\,e\right )\,\left (a\,c\,f^2-5\,b\,d\,e^2+3\,a\,d\,e\,f+b\,c\,e\,f\right )}{\sqrt {e}\,\left (b\,c^2\,e\,f^2+a\,c^2\,f^3-6\,b\,c\,d\,e^2\,f+2\,a\,c\,d\,e\,f^2+5\,b\,d^2\,e^3-3\,a\,d^2\,e^2\,f\right )}\right )\,\left (c\,f-d\,e\right )\,\left (a\,c\,f^2-5\,b\,d\,e^2+3\,a\,d\,e\,f+b\,c\,e\,f\right )}{2\,e^{3/2}\,f^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________